//
//  NSString+MY.h
//  MiaoYin
//
//  Created by juweitu on 2020/3/26.
//  Copyright © 2020 thy. All rights reserved.
//

#import <Foundation/Foundation.h>

@class LSMediaRecordStatistics;
NS_ASSUME_NONNULL_BEGIN

@interface NSString (MY)
/**
 *  截取URL中的参数
 *
 *  @return NSMutableDictionary parameters
 */
- (NSMutableDictionary *)getURLParameters;
//千分位分割
- (NSString *)changeNumberFormat;
//获取当前时间戳
+ (NSString *)getNowTimeTimestamp;

- (NSString *)transformCharacter;

- (NSString *)formatterBankCardNum;

+ (NSString *)getYear;

+ (NSString *)getMonth;

+ (NSString *)getMonthAndYear;

+ (NSString *)getMonthAndYear2;

- (NSDate *)dateWithDateFormatString:(NSString *)formatString;

- (NSMutableAttributedString *)formattingPriceWithMinFont:(NSInteger)min;
- (NSMutableAttributedString *)formattingDiscountPrice;
+ (NSString *)dateFormatStringHM:(NSInteger)time;
+ (NSString *)dateFormatString:(NSInteger)time;
+ (NSString *)dateStringFormatTimeStamp:(NSString *)time;
//时间戳转时间字符串
+ (NSString *)dateFormatString:(NSInteger)time withFormat:(NSString *)format;
//时间字符串转时间戳
+ (NSString *)dateStringFormatTimeStamp:(NSString *)time withFormat:(NSString *)format;
+ (NSString *)getDateWithYMD;

+ (NSInteger)dateFormatStringWithDayStart;
+ (NSString *)changeAsset:(NSString *)amountStr;
//获取当前时间戳
+ (NSString *)currentTimeStr;
//nim

+ (NSString *)timeStringWithSecond:(NSInteger)second;
+ (NSString *)timeStringWithFormatSecond:(NSInteger)second;
+ (NSString *)outputFileName;

+ (NSString *)documentDirectory;

+ (NSString *)documentSubDirectory:(NSString *)name;

- (CGFloat)heightWithWidth:(CGFloat)width;

+ (NSString *)infoStringWithLSMediaRecordStatistics:(LSMediaRecordStatistics *)pStatistic;
///doubleVal  转NSString---目前针对MYC RMB
+ (NSString*)getStringFrom:(double)doubleVal minimumFractionDigits:(int)minF  positivePrefix:(NSString *)pf  positiveSuffix:(NSString *)sf;

/// 判断字符串是否为空 YES为空  NO为非空
/// @param string 字符串
+ (BOOL)isBlankString:(NSString *)string;

/// 字符串urlencode编译
- (NSString *)stringByURLEncode;

/// MD5转码
- (NSString *)stringToMD5;
@end

NS_ASSUME_NONNULL_END
